public class SalariedEmployee extends Employee
{

    private double monthlySalary;

    public SalariedEmployee()
    {
        this(" ", 0, new MyDate(0,0,0), 0.0);
    }

    public SalariedEmployee(String name, int number, MyDate birthday, double monthlySalary) {
        super(name, number, birthday);
        this.monthlySalary = monthlySalary;
    }

    public double getMonthlySalary() {
        return monthlySalary;
    }

    public void setMonthlySalary(double monthlySalary) {
        this.monthlySalary = monthlySalary;
    }

    @Override
    public double earnings()
    {
        return this.getMonthlySalary();
    }

    public String toString()
    {
        return "SalariedEmployee: " + super.toString();
//                "\n姓名: " + this.getName() +
//                "\n编号: " + this.getNumber() +
//                "\n生日: " + this.getBirthday().toDateString();
    }
}
